package main

import (
	"fmt"
	_ "gitee.com/leicc/go-imsrv-app/docs"
	"gitee.com/leicc/go-core"
	"github.com/gin-gonic/gin"
	swaggerFiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
)

func main() {
	//通过环境变量设置加载配置
	config := core.AppConfigSt{Host: "0.0.0.0:9090"}
	coApp := core.NewApp(&config)
	coApp.RegHandler(func(c *gin.Engine) {
		c.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
	})
	fmt.Println("访问地址", "http://127.0.0.1:9090/swagger/index.html")
	coApp.Start() //启动服务
}
